import React from 'react'
// ===================================================================== Temp
import Table from '#cpt/temp/Table'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		data:[],
		pag: {},
		rows:[]
	}
	// paging
	fetch = (rows) => {
		if(rows){this.rows = rows}
		const { team_id, shelf_id } = this.rows
		$fn.fetch.call(this,'receive/index', { param: {team_id, shelf_id, handover_type:'', keyword:''} })
	}
	
	// 关联表单
	cols = [
		{ title: '标本条码',		dataIndex: 'spec_code', 		...$fn.table.spec_code },
		{ title: '标本架代码',	dataIndex: 'sf_code', 			...$fn.table.exp_num },
		{ title: '标本架编号',	dataIndex: 'sf_number', 		...$fn.table.exp_num },
		{ title: '实验号',		dataIndex: 'lb_tpl', 			...$fn.table.exp_num },
		{ title: '创建人',		dataIndex: 'founder', 			...$fn.table.name },
		{ title: '创建日期',		dataIndex: 'created_at', 		...$fn.table.time },
		{ title: '领取人',		dataIndex: 'receive_user', 		...$fn.table.name },
		{ title: '领取时间',		dataIndex: 'receive_time', 		...$fn.table.time },
		{ title: '岗位',		dataIndex: 'job_id', 			width:150 },
		{ title: '科室',		dataIndex: 'team_name', 		width:150 },
		{ title: '状态',		dataIndex: 'handover_type', 	...$fn.table.status }
	]

	render(){
		return  Table.call(this) 
	}
}

export default Index